Completed
Push — master ( b8c0d7...8cf4a8 )
by Pieter Epeüs
21s queued 10s
created

f   A

Complexity

Total Complexity 19

Size/Duplication

Total Lines 1
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 19
eloc 1
dl 0
loc 1
rs 10
c 0
b 0
f 0
1
const e=require("./modules/multisort.js"),t=require("./modules/multifilter.js"),r=require("./modules/multikey.js"),s=require("./modules/intersect.js"),u=require("./modules/min.js"),i=require("./modules/max.js"),m=require("./modules/diff.js"),l=require("./modules/unique.js"),n=require("./modules/summ.js"),h=require("./modules/average.js"),o=require("./modules/random.js"),d=require("./modules/getByKey.js"),a=require("./modules/first.js"),g=require("./modules/last.js");class f extends Array{static get[Symbol.species](){return Array}multisort(t,r){return e(this[0],t,r)}multifilter(e,r,s){return t(this[0],e,r,s)}multikey(e){return r(this[0],e)}intersect(e,t){return s(this[0],e,t)}diff(e,t){return m(this[0],e,t)}get unique(){return l(this[0])}pushIfNotExists(e){return this.indexOf(e)<0&&this.push(e),this.length}pushMultiple(e){return this.push(...e),this.length}pushMultipleIfNotExists(e){const t=this;return e.forEach(e=>{t.pushIfNotExists(e)}),t.length}get max(){return i(this[0])}get min(){return u(this[0])}get random(){return o(this)}get summ(){return n(this[0])}get average(){return h(this[0])}getByKey(e,t){return d(this[0],e,t)}get first(){return a(this[0])}get last(){return g(this[0])}}module.exports={Arr:f,multisort:e,multifilter:t,multikey:r,intersect:s,min:u,max:i,diff:m,unique:l,summ:n,average:h,random:o,getByKey:d,first:a,last:g};
0 ignored issues
show
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Coding Style introduced by
This line has a length of 1354. Maximum allowed is 120.
Loading history...
introduced by
Expected 1 empty line after require statement not followed by another require.
Loading history...
Coding Style introduced by
As per coding-style, please split const declaration into multiple statements.
Loading history...
introduced by
Unable to resolve path to module './modules/multisort.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/multifilter.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/multikey.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/intersect.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/min.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/max.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/diff.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/unique.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/summ.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/average.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/random.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/getByKey.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/first.js'.
Loading history...
introduced by
Unable to resolve path to module './modules/last.js'.
Loading history...
introduced by
Expected blank line between class members.
Loading history...
introduced by
't' is already declared in the upper scope.
Loading history...
introduced by
'r' is already declared in the upper scope.
Loading history...
introduced by
'e' is already declared in the upper scope.
Loading history...
introduced by
's' is already declared in the upper scope.
Loading history...
introduced by
Unexpected use of comma operator.
Loading history...
2
//# sourceMappingURL=helpers.modern.js.map
0 ignored issues
show
introduced by
Expected exception block, space or tab after '//' in comment.
Loading history...
3